package Day9;

import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class FlowLayoutDemo {

	public static void main(String[] args) {
		JFrame frame = new JFrame("FlowLayoutPanel");
		JPanel panel = new JPanel();
		frame.add(panel);
		
		panel.setLayout(new FlowLayout(FlowLayout.LEFT));
		JButton button1 = new JButton("11");
		JButton button2 = new JButton("22");
		JButton button3 = new JButton("33");
		JButton button4 = new JButton("44");
		panel.add(button1);
		panel.add(button2);
		panel.add(button3);
		panel.add(button4);
		
		frame.setSize(500, 200);
		frame.setLocation(500, 400);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}

}
